package com.chuangke.message.model;

public class Message {

	public static final String TYPE_SMS = "sms";
	public static final String TYPE_MESSAGE = "message";

	private String fromUserId;
	private String toUserId;
	private String toUserTelphone;
	private String message;
	private String type;
	
	public static Message buildSysMessage(String toUserId, String msg) {
		return buildSysMessage(null,toUserId,msg) ;
	}

	public static Message buildSysMessage(String fromUserId, String toUserId, String msg) {
		Message message = new Message() ;
		message.setFromUserId(fromUserId);
		message.setToUserId(toUserId);
		message.setMessage(msg);
		message.setType(Message.TYPE_MESSAGE);
		
		return message ;
	}
	
	public static Message buildSmsMessage(String toUserId,String toUserTelphone, String msg) {
		Message message = new Message() ;
		message.setToUserId(toUserId);
		message.setToUserTelphone(toUserTelphone);
		message.setMessage(msg);
		message.setType(Message.TYPE_SMS);
		
		return message ;
	}

	public String getFromUserId() {
		return fromUserId;
	}

	public void setFromUserId(String fromUserId) {
		this.fromUserId = fromUserId;
	}

	public String getToUserId() {
		return toUserId;
	}

	public void setToUserId(String toUserId) {
		this.toUserId = toUserId;
	}

	public String getToUserTelphone() {
		return toUserTelphone;
	}

	public void setToUserTelphone(String toUserTelphone) {
		this.toUserTelphone = toUserTelphone;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

}
